<!--
  @author heguanghua
  @since 2019/06/12 11:57
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<div class="layui-card-body" th:fragment="query">

    <div class="zmn-form-item">
        <div class="item-inline">
            <label class="inline-label">ID/名称：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <input type="text" name="keyword" th:value="${query.keyword}" placeholder="ID或名称" autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline" th:if="${#authPermit.checkPermit('/channel/showInnerName.action')}">
            <label class="inline-label">内部名称：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <input type="text" name="innerName" th:value="${query.innerName}" placeholder="公司简称" autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>
            </div>
        </div>


        <div class="item-inline col2">
            <label class="inline-label">状态：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline col2">
                        <select name="status" lay-search>
                            <option value=""></option>
                            <option th:each="status:${statusList}" th:value="${status.code}" th:selected="${status.code == query.status}" th:text="${status.name}"/>
                        </select>
                    </div>
                    <div class="box-input-inline col2">
                        <select name="contractExpiresDateStatus" lay-search>
                            <option value=""></option>
                            <option value="1" th:selected="${1 == query.contractExpiresDateStatus}">正常</option>
                            <option value="2" th:selected="${2 == query.contractExpiresDateStatus}">即将到期</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <div class="zmn-form-item">

        <div class="item-inline">
            <label class="inline-label">渠道类型：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select name="channelType" lay-search>
                            <option value=""></option>
                            <option th:each="channelType:${channelTypes}" th:value="${channelType.code}" th:selected="${channelType.code == query.channelType}" th:text="${channelType.name}"/>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">所属平台：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select lay-filter="plat" id="plat" name="plat" lay-search>
                            <option value=""></option>
                            <option th:each="plat:${plats}" th:value="${plat.key}" th:selected="${plat.key == query.plat}" th:text="${plat.value}"/>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline col2">
            <label class="inline-label">商务部门：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline col2">
                        <div id="deptId"></div>
                    </div>
                    <div class="box-input-inline col2">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="zmn-form-item">

        <div class="item-inline">
            <label class="inline-label">运营责任人：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <input type="text" name="abutmenterName" th:value="${query.abutmenterName}" placeholder="运营责任人" autocomplete="off" class="layui-input" maxlength="20"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">重要渠道：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select name="level" lay-search>
                            <option value=""></option>
                            <option th:each="channelLevel:${channelLevels}" th:value="${channelLevel.code}" th:selected="${channelLevel.code == query.level}" th:text="${channelLevel.name}"/>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline col2">
            <label class="inline-label">故障价格表：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline col2">
                        <select name="bizType" lay-filter="bizType" lay-search>
                            <option value=""></option>
                            <option value="1" th:selected="${query.bizType == 1}">C-保外</option>
                            <option value="2" th:selected="${query.bizType == 2}">F-保内</option>
                            <option value="3" th:selected="${query.bizType == 3}">B-工程</option>
                        </select>
                    </div>
                    <div class="box-input-inline col2">
                        <select id="tariffId" name="tariffId" lay-search>
                            <option value=""></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <div class="zmn-form-item">
        <div class="item-inline">
            <label class="inline-label">一级渠道：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="parentId" name="parentId" lay-search>
                            <option value=""></option>
                            <option th:each="oneChannel:${oneChannels}" th:value="${oneChannel.channelId}" th:selected="${oneChannel.channelId == query.parentId}" th:text="${oneChannel.name}"/>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">渠道级别：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select name="rank" lay-search>
                            <option value=""></option>
                            <option value="1" th:selected="${query.rank == 1}">一级渠道</option>
                            <option value="2" th:selected="${query.rank == 2}">二级渠道</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline col2">
            <label class="inline-label">服务价格表：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline col2">
                        <select name="servBizType" lay-filter="servBizType" lay-search>
                            <option value=""></option>
                            <option value="1" th:selected="${query.bizType == 1}">C-保外</option>
                            <option value="2" th:selected="${query.bizType == 2}">F-保内</option>
                            <option value="3" th:selected="${query.bizType == 2}">B-工程</option>
                        </select>
                    </div>
                    <div class="box-input-inline col2">
                        <select id="servPriceId" name="servPriceId" lay-search>
                            <option value=""></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="zmn-form-item">
        <div class="item-inline">
            <label class="inline-label">接入方式：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select name="accessMode" lay-search>
                            <option value=""></option>
                            <option th:each="channelAccess:${channelAccessModes}" th:value="${channelAccess.key}" th:selected="${channelAccess.key == query.accessMode}" th:text="${channelAccess.value}"/>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">运营部门：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <div id="abutmentDeptId"></div>
                    </div>
                    <div class="box-input-inline">
                    </div>
                </div>
            </div>
        </div>

        <div class="item-submit">
            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="zmn-board-form-submit"><i class="layui-icon">&#xe615;</i></button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe669;</i></button>
            <button class="layui-btn d-button" lay-submit lay-filter="query-export" id="query-export" style="display: none">导出</button>
        </div>
    </div>

</div>

</html>